//
//  MyPickerView.h
//  安好
//
//  Created by qinlongqing on 14/11/27.
//  Copyright (c) 2014年 lianchuangbrother. All rights reserved.
//

#import <UIKit/UIKit.h>

@class MyPickerView;
@protocol MyPickerViewDelegate <NSObject>

@required
- (NSInteger)numberOfComponentsInMyPickerView:(MyPickerView *)myPickerView;

- (NSInteger)myPickerView:(MyPickerView *)myPickerView numberOfRowsInComponent:(NSInteger)component;

- (CGFloat)myPickerView:(MyPickerView *)myPickerView rowHeightForComponent:(NSInteger)component;

- (NSString *)myPickerView:(MyPickerView *)myPickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component;

@optional
- (void)myPickerView:(MyPickerView *)myPickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component;

- (void)myPickerViewSureSelected:(MyPickerView *)myPickerView;

- (void)myPickerViewCancelSelected:(MyPickerView *)myPickerView;

@end

@interface MyPickerView : UIView

- (void)reloadAllComponents;

- (void)reloadComponent:(NSInteger)component;

- (void)selectRow:(NSInteger)row inComponent:(NSInteger)component animated:(BOOL)animated;

- (NSInteger)selectedRowInComponent:(NSInteger)component;

@property (nonatomic,weak) id<MyPickerViewDelegate>delegate;

@end
